package com.njuse.jvmfinal.Instruction;

import java.nio.ByteBuffer;

import com.njuse.jvmfinal.runtimestructure.Jframe;

public class DUP extends Instruction {
	
	public  void readindex(ByteBuffer reader) {
      //pass
	}
	
	public  void execute(Jframe frame) {
		int top=frame.getStacktop();
		Object[] stack=frame.getManagestack();
		stack[top]=stack[top-1];
		top++;
        frame.setManagestack(stack);
        frame.setStacktop(top);
	}
}
